package com.yshy.moviechoseseatinginnerapi.service.impl;

import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.serializer.SerializerFeature;
import com.yshy.moviechoseseatinginnerapi.service.RegionsService;
import com.yshy.moviechoseseatingcommon.entity.bo.regions.ListByCityIdBo;
import com.yshy.moviechoseseatingcommon.entity.vo.regions.ListByCityIdVo;
import com.yshy.moviechoseseatingcommon.util.RequstUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author :
 * @desc :
 * @create: 下午5:18
 **/
@Service
public class RegionsServerceImpl implements RegionsService {
    @Autowired
    RequstUtil requstUtil;
    @Override
    public String listByCityId(ListByCityIdBo bo) {
        ListByCityIdVo listByCityIdVo = requstUtil.regionsListByCityId(bo);
        if(listByCityIdVo==null){
            return "请求异常";
        }
        return JSONObject.toJSONString(listByCityIdVo, SerializerFeature.WriteMapNullValue);
    }
}
